<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Greeting Page</title>
    <script>
        function fetchGreeting() {
            fetch('/greet')
                .then(response => response.text())
                .then(data => {
                    document.getElementById('greetingResponse').textContent = data;
                })
                .catch(error => console.error('Error:', error));
        }
    </script>
</head>
<body>
    <h1>Click the button to fetch a greeting:</h1>
    <button onclick="fetchGreeting()">Get Greeting</button>
    <p id="greetingResponse"></p>
</body>
</html>